package com.gadgets.framework.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {

    private static final SimpleDateFormat simpleDateFormat8bit = new SimpleDateFormat("yyyyMMdd");

    private static final SimpleDateFormat simpleDateFormat10bit = new SimpleDateFormat("yyyy-MM-dd");

    /**
     * 获取8位日期
     * @return  yyyyMMdd
     */
    public static String getData8bit(){
        return simpleDateFormat8bit.format(new Date());
    }

    /**
     * 获取10位日期
     * @return  yyyyMMdd
     */
    public static String getDate10bit(){
        return simpleDateFormat10bit.format(new Date());
    }
    
    public static String getDate10bitForParam(Date date){
        return simpleDateFormat10bit.format(date);
    }

}
